package l.l.w.网易2018实习.被3整除;

/**
 * Created by llw on 2018/3/28/0028.
 */
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int l = scanner.nextInt();
        int r = scanner.nextInt();
        int temp1 = getCount(r);
        int temp2 = getCount(l-1);
        int  result = (r - l + 1) - (temp1 - temp2);
        System.out.println(result);
    }
    private static int getCount(int i){
        int count = (i+2) / 3;
        return count;
    }
}
